package asteroids.model.programs.parsing.statements;
import asteroids.model.programs.MemoryCell;

//EXTENDS CLONEABLE BETEKENT DAT IN ELKE KLASSE TOSTRING MOET BIJGEWERKT WORDEN, NOODZAKELIJK VOOR DE WERKING VAN STATEMENTS!!
public abstract class S implements Cloneable{
	public S(int line, int column){
		memCell = new MemoryCell(line, column);			//no need to check whether or not line & column are valid. (happens in Mem.Cell)
	}

	public abstract void execute(ExecuteManager executeManager);

	public int getLine(){
		return getMemoryCell().getLine();				//Een clone hiervan? 
	}

	public int getColumn(){
		return getMemoryCell().getColumn();				//Een clone hiervan?
	}

	private MemoryCell getMemoryCell(){
		return this.memCell;
	}
	public void setExecuted(){
		this.executed =true;
	}
	public boolean getExecuted(){
		return this.executed;
	}
	public void redo(){
		this.executed =false;	
	}
	private final MemoryCell memCell;
	private boolean executed = false;
}
